home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / HippoDraw / hippo / hippoplotPS.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-28  |  2.9 KB  |  108 lines

  1. #ifndef _hippoplotPS_h_
  2. #define _hippoplotPS_h_
  3.  
  4. /*
  5.  * hippoplotPS.c - Postscript routines for displaying hippo ntuples.
  6.  *
  7.  * Copyright (C)  1991  The Board of Trustees of The Leland Stanford
  8.  * Junior University.  All Rights Reserved.
  9.  *
  10.  * $ID$
  11.  *
  12.  */
  13.  
  14. #include "hippo.h"
  15.  
  16. #define _HIPPOPLOTPS_H_RCSID_ "$ID$"
  17.  
  18. /*
  19.  * Initialize the plot driver. Specify that the given file pointer will
  20.  * be used for output. This routine should be called once for a new file.
  21.  * If the user wants to change files, she should close the current file,
  22.  * open a new one, and call h_setPlotDrvr again.
  23.  */
  24. int initDrvr_PS( FILE *fl );
  25.  
  26. /*
  27.  * endDrvr - do any cleanup work when you are done with this driver.
  28.  */
  29. int endDrvr_PS( void );
  30.  
  31.  
  32. /*
  33.  * initPlot - specify the outer and inner rectangles in device coords,
  34.  * and the inner rectangle again in user coords. This sets global
  35.  * values that are used by the other routines, so it should be called
  36.  * whenever any rectangle specification is changed.
  37.  */
  38. int initPlot_PS(rectangle *rect1, rectangle *rect2, rectangle *rect3);
  39.  
  40. /*
  41.  * endPage - end the page.
  42.  */
  43. int endPage_PS( void );
  44.  
  45. /*
  46.  * Draw lines between coordinates
  47.  */
  48. int drawLine_PS(float *coords, int nCoords, linestyle_t ls);
  49.  
  50. /*
  51.  * Draw a series of points, using the symbol specified
  52.  */
  53. int drawPoints_PS(float *coords, int nCoords, plotsymbol_t symbol,
  54.             float symbolSize);
  55.  
  56. /*
  57.  * Draw vertical error bars.  We use only the x part of the
  58.  * coordinates, plus the y-low and y-high pairs.
  59.  */
  60. int drawYError_PS(float *coords, float *errorYs, int nCoords);
  61.  
  62. /*
  63.  * Draw horizontal error bars.  We use only the y part of the
  64.  * coordinates, plus the x-low and x-high pairs.
  65.  */
  66. int drawXError_PS(float *coords, float *errorXs, int nCoords);
  67.  
  68. /*
  69.  * Place text at a given location in device coords. X alignment is
  70.  * specified as 'L', 'R', or 'C' (or lower case), meaning that the
  71.  * left, right, or center of the text is positioned at the xy
  72.  * location.  Similarly Y alignment is given as 'B', 'C', or 'T', for
  73.  * bottom, center or top.  Rotation is then performed, given in
  74.  * degrees anti-clockwise.  The variable 'fontSize' is the size in
  75.  * 'points'.
  76.  */
  77. int drawText_PS(char *string, float x, float y, float fontSize, 
  78.           float rotation, char xAlign, char yAlign);
  79.  
  80. /*
  81.  * draw ticks and labels along Y axis
  82.  */
  83. int drawYTicks_PS( float *ticks, int nticks, float tickwidth, int side );
  84. int drawXTicks_PS( float *ticks, int nticks, float tickwidth, int side );
  85.  
  86. /*
  87. * shade portions of plot to indicate areas removed by a cut
  88. */
  89. int shade_PS(float xlow, float xhigh, float ylow, float yhigh );
  90.  
  91.  
  92. /*
  93.  * plot "x10^mag" at specified location
  94.  */
  95. int drawMag_PS( float x, float y, int mag, float fontSize );
  96.  
  97. /*
  98.  * greyscale/color 2D plot for the NeXT
  99.  */
  100. int drawColor2D_PS(int nXBins, int nYBins, rectangle *marginRect,
  101.              float *data, float binMin, float binMax, int useColor );
  102.  
  103.  
  104.  
  105. int drawLego2D_PS(rectangle *marginRect);
  106.  
  107. #endif                /* ifndef _hippoplotPS_h_ */
  108.